home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / VGADOC4B.ZIP / VESA.TXT < prev    next >
Text File  |  1995-09-29  |  13KB  |  326 lines

  1. The VESA BIOS interface is a software interface for detection capabilities,
  2. setting modes and setting the bank register.
  3.  
  4. VESA 1.0   VESA Standard #VS891001
  5. VESA 1.1   VESA Standard #VS900602
  6. VESA 1.2   VESA Standard #VS911022
  7. VESA 2.0   VESA Standard
  8.  
  9. ----------104F00-----------------------------
  10. INT 10 - VESA SuperVGA BIOS - GET SuperVGA INFORMATION
  11.         AX = 4F00h
  12.         ES:DI -> 256-byte buffer for SuperVGA information (see below)
  13. Return: AL = 4Fh function supported
  14.         AH = status
  15.              00h successful
  16.              01h failed
  17.              02h (VBE 2) function not supported by current hardware config
  18.              03h (VBE 2) function invalid in current mode
  19.  
  20. Format of SuperVGA information:
  21. Offset  Size      Description
  22.  00h   4 BYTEs    Signature ('VESA'). For VBE 2.0 this field must be set to
  23.                   "VBE2" before the call to fill in the version 2.0 fields
  24.  04h    WORD      VESA version number
  25.  06h    DWORD     pointer to OEM name
  26.  0Ah   4 BYTEs    capabilities.
  27.                   Bit  0  Set if the DAC can switch width, clear if it is
  28.                           fixed 6bits per primary color
  29.                        1  (VBE2) non-VGA controller
  30.                        2  (VBE2) Programmed DAC with blank bit
  31.  0Eh    DWORD     pointer to list of supported VESA and OEM video modes
  32.                   Terminated with 0FFFFh.
  33.  12h    WORD      Video memory in 64k blocks
  34. --- VBE v2.0 ---
  35.  14h    WORD      OEM software version
  36.  16h    DWORD     Pointer to vendor name
  37.  1Ah    DWORD     Pointer to product name
  38.  1Eh    DWORD     Pointer to product revision string
  39. 100h  256 BYTEs   OEM scratchpad
  40. The buffer is defined as 256bytes for version 1.0 & 1.2, 262 bytes for version
  41.  1.1 and 512 bytes for version 2.0. Note: Some VESA drivers have been known to
  42.  write beoynd the end of the official buffer.
  43. ----------104F01-----------------------------
  44. INT 10 - VESA SuperVGA BIOS - GET SuperVGA MODE INFORMATION
  45.         AX = 4F01h
  46.         CX = SuperVGA video mode
  47.         ES:DI -> 256-byte buffer mode information (see below)
  48. Return: AL = 4Fh function supported
  49.         AH = status
  50.              00h successful
  51.              01h failed
  52.  
  53. Format of mode information:
  54. Offset Size     Description
  55.  00h   WORD     mode attributes
  56.                 bit 0: mode supported if set
  57.                     1: optional information available if set
  58.                     2: BIOS output supported if set
  59.                     3: set if color, clear if monochrome
  60.                     4: set if graphics mode, clear if text mode
  61.                     5: (VBE2) non-VGA mode
  62.                     6: (VBE2) No bank swiotching supported
  63.                     7: (VBE2) Linear framebuffer mode supported
  64.  02h   BYTE     window A attributes
  65.                 bit 0: exists if set
  66.                     1: readable if set
  67.                     2: writable if set
  68.                 bits 3-7 reserved
  69.  03h   BYTE     window B attributes (as for window A)
  70.  04h   WORD     window granularity in K
  71.  06h   WORD     window size in K
  72.  08h   WORD     start segment of window A
  73.  0Ah   WORD     start segment of window B
  74.  0Ch   DWORD -> FAR window positioning function (equivalent to AX=4F05h)
  75.  10h   WORD     bytes per scan line
  76. ---remainder is optional for VESA modes, needed for OEM modes---
  77.  12h   WORD     width in pixels
  78.  14h   WORD     height in pixels
  79.  16h   BYTE     width of character cell in pixels
  80.  17h   BYTE     height of character cell in pixels
  81.  18h   BYTE     number of memory planes
  82.  19h   BYTE     number of bits per pixel
  83.  1Ah   BYTE     number of banks
  84.  1Bh   BYTE     memory model type
  85.                    0 Text
  86.                    1 CGA graphics
  87.                    2 Hercules Graphics
  88.                    3 EGA 16 color
  89.                    4 Packed pixels
  90.                    5 Non chain 4 256 color modes
  91.                    6 Direct 15/16/24 bit
  92.                    7 YUV (luminance-chrominance, alos called YIQ)
  93.                8-0Fh Reserved for VESA
  94.             10h-0FFh Reserved for OEM
  95.  1Ch   BYTE     size of bank in K
  96.  1Dh   BYTE     number of image pages
  97.  1Eh   BYTE     reserved(1)
  98. ------VBE v1.2+ --------------------------
  99.  1Fh   BYTE     Red mask size
  100.  20h   BYTE     Red mask position
  101.  21h   BYTE     Green mask size
  102.  22h   BYTE     Green mask position
  103.  23h   BYTE     Blue mask size
  104.  24h   BYTE     Blue mask position
  105.  25h   BYTE     Reserved mask size
  106.  26h   BYTE     Reserved mask position
  107.  27h   BYTE     Direct Screen mode info
  108.                 Bit  0  If set the color ramp is programmable, if clear fixed
  109.                      1  If set the reserved field (as defined by Bytes 25-26h)
  110.                         can be used by the application, if clear the field is
  111.                         truly reserved.
  112. --- VBE v2.0 ---
  113.  28h   DWORD    Physical address of linear video buffer
  114.  2Ch   DWORD    Pointer to start of offscreen memory
  115.  30h   WORD     Offscreen memory in Kbytes
  116. The buffer is defined as 256bytes
  117. ----------104F02-----------------------------
  118. INT 10 - VESA SuperVGA BIOS - SET SuperVGA VIDEO MODE
  119.         AX = 4F02h
  120.         BX = mode
  121.              bit 15 set means don't clear video memory
  122.              bit 14 (VBE2) set to enable linear framebuffer mode
  123. Return: AL = 4Fh function supported
  124.         AH = status
  125.              00h successful
  126.              01h failed
  127.  
  128. Values for VESA video mode:
  129.   00h-FFh OEM video modes (see AH=00h)
  130.  100h 640x400x256
  131.  101h 640x480x256
  132.  102h 800x600x16
  133.  103h 800x600x256
  134.  104h 1024x768x16
  135.  105h 1024x768x256
  136.  106h 1280x1024x16
  137.  107h 1280x1024x256
  138.  108h 80x60 text
  139.  109h 132x25 text
  140.  10Ah 132x43 text
  141.  10Bh 132x50 text
  142.  10Ch 132x60 text
  143.  ------------ VBE v1.2+ ------------------
  144.  10Dh 320x200 32k
  145.  10Eh 320x200 64k
  146.  10Fh 320x200 16M
  147.  110h 640x480 32k
  148.  111h 640x480 64k
  149.  112h 640x480 16M
  150.  113h 800x600 32k
  151.  114h 800x600 64k
  152.  115h 800x600 16M
  153.  116h 1024x768 32k
  154.  117h 1024x768 64k
  155.  118h 1024x768 16M
  156.  119h 1280x1024 32k
  157.  11Ah 1280x1024 64k
  158.  11Bh 1280x1024 16M
  159.  ------------ VBE 2.0 --------------------
  160. 81FFh Special full-memory access mode
  161.       Mode 81FFh preserves the contents of video memory and gives access to
  162.       the entire video memory. It is recommanded that mode 81FFh should be a
  163.       packed pixel mode.
  164.  
  165. ----------104F03-----------------------------
  166. INT 10 - VESA SuperVGA BIOS - GET CURRENT VIDEO MODE
  167.         AX = 4F03h
  168. Return: AL = 4Fh function supported
  169.         AH = status
  170.              00h successful
  171.              01h failed
  172.         BX = video mode (see AX=4F02h)
  173. ----------104F04-----------------------------
  174. INT 10 - VESA SuperVGA BIOS - SAVE/RESTORE SuperVGA VIDEO STATE
  175.         AX = 4F04h
  176.         DL = subfunction
  177.              00h get state buffer size
  178.                  Return: BX = number of 64-byte blocks needed
  179.              01h save video states
  180.                  ES:BX -> buffer
  181.              02h restore video states
  182.                  ES:BX -> buffer
  183.         CX = flags for states to save/restore
  184.               bit 0: video hardware state
  185.               bit 1: video BIOS data state
  186.               bit 2: video DAC state
  187.               bit 3: SuperVGA state
  188. Return: AL = 4Fh function supported
  189.         AH = status
  190.              00h successful
  191.              01h failed
  192. ----------104F05-----------------------------
  193. INT 10 - VESA SuperVGA BIOS - CPU VIDEO MEMORY CONTROL
  194.         AX = 4F05h
  195.         BH = subfunction
  196.              00h select video memory window
  197.                  DX = window address in video memory (in granularity units)
  198.              01h get video memory window
  199.                  Return: DX = window address in video memory (in gran. units)
  200.         BL = window number
  201.              00h window A
  202.              01h window B
  203. Return: AL = 4Fh function supported
  204.         AH = status
  205.              00h successful
  206.              01h failed
  207. ----------104F06-----------------------------
  208. INT 10 - VESA SuperVGA BIOS 1.1+ - GET/SET LOGICAL SCAN LINE LENGTH
  209.         AX = 4F06h
  210.         BL = function
  211.              00h set scan line length
  212.                  CX = desired width in pixels
  213.              01h get scan line length
  214.              02h (VBE 2) set scan line length
  215.                  CX = desired width in bytes
  216.              03h (VBE 2) get maximum scan line length
  217. Return: AL = 4Fh if function supported
  218.         AH = status
  219.              00h successful
  220.              01h failed
  221.         BX = bytes per scan line
  222.              Maximum bytes per scan line for function 03h
  223.         CX = number of pixels per scan line
  224.              Maximum pixels per scan line for function 03h
  225.         DX = maximum number of scan lines
  226.              Unchaqnged for function 03h
  227. Notes: if the desired width is not achievable, the next larger width will be
  228.        set. The scan line may be wider than the visible area of the screen
  229.        this function is valid in text modes, provided that values are
  230.        multiplied by the character cell width/height
  231. ----------104F07BH00-------------------------
  232. INT 10 - VESA SuperVGA BIOS 1.1+ - GET/SET DISPLAY START
  233.         AX = 4F07h
  234.         BH = 00h (reserved)
  235.         BL = 00h (or 80h) set display start
  236.                  CX = leftmost displayed pixel in scan line
  237.                  DX = first displayed scan line
  238.            = 01h get display start
  239.                  Return: BH = 00h
  240.                          CX = leftmost displayed pixel in scan line
  241.                          DX = first displayed scan line
  242. Return: AL = 4Fh if function supported
  243.         AH = status
  244.              00h successful
  245.              01h failed
  246. Note: this function is valid in text modes, provided that values are
  247.       multiplied by the character cell width/height
  248. ----------104F08-----------------------------
  249. INT 10 - VESA SuperVGA BIOS v1.2+ - GET/SET DAC PALETTE CONTROL
  250.         AX = 4F08h
  251.         BL = function
  252.              00h  Set DAC palette width
  253.                   BH = desired number of bits per primary color.
  254.              01h  Get DAC palette width
  255. Return: AL = 4Fh if function supported
  256.         AH = status
  257.         BH = Current number of bits per primary color (6 = Standard VGA)
  258. ----------104F09-----------------------------
  259. INT 10 - VESA SuperVGA BIOS v2.0+ - GET/SET PALETTE ENTRIES
  260.         AX = 4F09h
  261.         BL = function
  262.             00h set palette
  263.             01h get palette
  264.             02h set secondary palette data
  265.             03h get secondary palette data
  266.             80h set palette during vertical retrace
  267.         CX = number of entries to change
  268.         DX = starting palette index
  269.         ES:DI -> palette buffer (array of 4 bytes per entry)
  270.                  Offset  Size   Description
  271.                    00h   BYTE   Red byte
  272.                    01h   BYTE   Green byte
  273.                    02h   BYTE   Blue byte
  274.                    03h   BYTE   Alpha or alignment byte
  275. Return: AL = 4Fh if function supported
  276.         AH = status
  277.             00h successful
  278.             01h failed
  279. ----------104F0A-----------------------------
  280. INT 10 - VESA SuperVGA BIOS v2.0+ - GET PROTECTED-MODE CODE
  281.         AX = 4F0Ah
  282.         BX = function to be copied
  283.              0001h  set bank
  284.              0002h  set display start
  285.              0003h  set palette
  286. Return: AL = 4Fh if function supported
  287.         AH = status
  288.             00h successful
  289.                 CX = number of bytes to copy
  290.                 ES:DI -> code for requested function
  291.             01h failed
  292. ----------104F10-----------------------------
  293. INT 10 - VESA DPMS - Display Power Management Extensions
  294.         AX = 4F10h
  295.         BL = 00h  Report VBE/PM Capabilities
  296.                   ES:DI = 0000h:0000h
  297.                   Return: BH = Power saving state signals supported:
  298.                                Bit 0  STAND BY supported if set
  299.                                    1  SUSPEND supported if set
  300.                                    2  OFF supported if set
  301.                                    3  REDUCED On supported if set
  302.                                       (Not supported in DPMS 1.0)
  303.                           BL = VBE/PM Version number:
  304.                                Bit 0-3  Minor version
  305.                                    4-7  Major version
  306.              01h  Set Display Power State
  307.                   BH = Requested Power State:
  308.                        00h  ON
  309.                        01h  STAND BY
  310.                        02h  SUSPEND
  311.                        04h  OFF
  312.                        08h  REDUCED ON (for flat screens)
  313.              02h  Get Display Power State
  314.                   Return: BH = Display Power State
  315.                                00h  ON
  316.                                01h  STAND BY
  317.                                02h  SUSPEND
  318.                                04h  OFF
  319.                                08h  REDUCED ON (for flat screens)
  320. Return: AL = 4Fh if function supported
  321.         AH = status
  322. ----------104FFF-----------------------------
  323. INT 10 - VESA SuperVGA BIOS - Everex - TURN VESA ON/OFF
  324.         AX = 4FFFh
  325.         DL = new state (00h off, 01h on)
  326.